<template>
  <div id="app">
    <router-view></router-view>
  </div>
</template>

<script>

export default {
  name: 'App',
  comments: {

  },
  data () {
    return {

    }
  },
  created () {
    // 检查用户是否已登录，如果未登录，则重定向到登录页面
    if (sessionStorage.getItem('userInfo') === null) {
      this.$router.push('/login')
    } else {
      this.$router.push('/Main')
    }
  }
}
</script>

<style>
html,body,#app {
/*  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;*/
  width: 100%;
  height: 100%;
}
</style>
